package com.ruoyi.hr.controller.hr.salary.specialPersonRegister;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.hr.service.salary.BtxzService;
import com.ruoyi.hr.util.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author zeo
 * @explain 拜特薪资
 * @date 2020/2/18
 */
@Controller
@RequestMapping("/btxz")
public class BtSalaryController extends BaseController {

    @Autowired
    BtxzService btxzService;

    private String prefix = "hr/salary/btxz";

    @GetMapping()
    public String btxz() {
        return prefix + "/btxz";
    }
    /**
     * 获取特殊人员登记数据
     *
     * @return
     */
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(@RequestParam Map map) {
        startPage();
        List<Map<String, Object>> list = btxzService.findData(map);
        return getDataTable(list);
    }

    /**
     * 执行获取数据存储过程
     */
    @ResponseBody
    @PostMapping("/getDataProcedure")
    public BaseResult getDataProcedure(String pgid, String term){
        return btxzService.getDataProcedure(pgid,term);
    }

}
